A significant portion of data used by computer systems is in the form of character arrays or strings. While comparing two numerical values using a processor (e.g., a microprocessor of a computer device) is typically very fast, comparing two strings can be more time consuming, as potentially all characters in the smallest string would need to be evaluated before a mismatch could be determined. Thus, in the worst case scenario, string comparison has a linear time complexity based on the number of characters in the shortest string. In some cases, it may be desirable to determine the degree of overlap between two strings, in which case the time complexity will always be linear with respect to the number of characters in the shortest string. For very long strings, or when large numbers of strings are to be compared, significant processing resources, and time, can be required.
String comparison can be even more complex, and time and processor intensive, when one or more characters of a string are to be analyzed to determine whether they fall within a set or range of values. In some cases, both a source string a target string may have one or more characters that can fall within a set, or range, of values. In these cases, it may be necessary to sequentially test a character of the target string against possible values specified in the source string. Thus, in the worst case, for a particular character in the target string, multiple possible character values may need to be tested against every possible value of the source string.
Machine learning can be an efficient way to compare quantities, to categorize or classify input values, and to discover and utilize patterns and relationships in data. In many cases, the results provided by machine learning can be more accurate, and can be obtained in a shorter amount of time and with less processing power, than using more traditional methods. In some cases, traditional methods may be simply be unable to replicate machine learning. However, machine learning typically requires numerical input, and thus may be unsuitable for use with strings, given how strings are typically represented in computing languages (e.g., as sequences of characters).
Thus, there remains room for improvement in string comparison technology, and its application in fields such as security and authorization.